#ifndef _SENSORS_H_
#define _SENSORS_H_

#include <Arduino.h>

typedef struct
{
  uint16_t tvoc;
  uint16_t eco2;
} GS_result_t;

typedef struct
{
  float pressure;
  float temperature;
  float humidity;
} ES_result_t;

typedef struct
{
  /* data */
  GS_result_t gs;
  ES_result_t es;
} Sensor_result_t;

void GS_init();
void GS_start();
void GS_stop();
GS_result_t GS_get_result(ES_result_t *);
boolean GS_SGP30_soft_reset();

void ES_init();
ES_result_t ES_get_result();

void Sensor_collect_loop();
Sensor_result_t Sensor_collect_once();
void Sensor_get_result(Sensor_result_t *);

void wait_until_data_stable();

#endif